import requests
from lxml import etree

page = 1
url = f'https://quotes.toscrape.com/page/{page}'
response = requests.get(url)
# print(response.text)
res_html = response.text
# print(type(res_html))
# content author tag
tree = etree.fromstring(res_html,parser=etree.HTMLParser())
quotes = tree.xpath('//div[@class="quote"]')
# print(len(quotes))

contents = tree.xpath('.//span[@class="text"]/text()')
# print(contents)
for content in contents:
    # print(content.strip('“').strip('”'))
    c = content.strip('“').strip('”')
authors = tree.xpath('.//small[@class="author"]/text()')
# print(author)
for author in authors:
    a = author
tags = tree.xpath('//a[@class="tag"]/text()')
# print(tags)
for tag in tags:
    t = tag
    print(t)